package com.hzsun.spring.component;

import com.hzsun.spring.bean.A;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @Author: DingJl
 * @Date: 2022/1/17 10:23
 * @Version 1.0
 */
@Component
public class FactoryBeans  implements FactoryBean {
    @Override
    public Object getObject() throws Exception {
        return new A();
    }

    @Override
    public Class<?> getObjectType() {
        return A.class;
    }

    public  void print(){
        System.out.println(FactoryBeans.class);
    }
}
